package test5.lupeng.jf.com.teamdemo.bean.response;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by C-yx on 2017/8/1.
 */

public class UserListResponse  implements  Parcelable{

    private ArrayList<ResultBean> result;

    protected UserListResponse(Parcel in) {
        result = in.createTypedArrayList(ResultBean.CREATOR);
    }

    public static final Creator<UserListResponse> CREATOR = new Creator<UserListResponse>() {
        @Override
        public UserListResponse createFromParcel(Parcel in) {
            return new UserListResponse(in);
        }

        @Override
        public UserListResponse[] newArray(int size) {
            return new UserListResponse[size];
        }
    };

    public ArrayList<ResultBean> getResult() {
        return result;
    }

    public void setResult(ArrayList<ResultBean> result) {
        this.result = result;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeTypedList(result);
    }

    public static class ResultBean implements Parcelable {
        /**
         * address : 中国
         * followeeStatus : false
         * followees : 0
         * follower : 0
         * headProtrait : http://img2.100bt.com/upload/ttq/20131103/1383470553132_middle.jpg
         * signature : 我很个性，没有签名！！！
         * userId : 597eea22fe88c20057e297e3
         * username : cyx96814
         * professional : Andorid
         * specialty : ["Java","Android"]
         */

        private String address;
        private boolean followeeStatus;
        private int followees;
        private int follower;
        private String headProtrait;
        private String signature;
        private String userId;
        private String username;
        private String professional;
        private ArrayList<String> specialty;

        protected ResultBean(Parcel in) {
            address = in.readString();
            followeeStatus = in.readByte() != 0;
            followees = in.readInt();
            follower = in.readInt();
            headProtrait = in.readString();
            signature = in.readString();
            userId = in.readString();
            username = in.readString();
            professional = in.readString();
            specialty = in.createStringArrayList();
        }

        public static final Creator<ResultBean> CREATOR = new Creator<ResultBean>() {
            @Override
            public ResultBean createFromParcel(Parcel in) {
                return new ResultBean(in);
            }

            @Override
            public ResultBean[] newArray(int size) {
                return new ResultBean[size];
            }
        };

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public boolean isFolloweeStatus() {
            return followeeStatus;
        }

        public void setFolloweeStatus(boolean followeeStatus) {
            this.followeeStatus = followeeStatus;
        }

        public int getFollowees() {
            return followees;
        }

        public void setFollowees(int followees) {
            this.followees = followees;
        }

        public int getFollower() {
            return follower;
        }

        public void setFollower(int follower) {
            this.follower = follower;
        }

        public String getHeadProtrait() {
            return headProtrait;
        }

        public void setHeadProtrait(String headProtrait) {
            this.headProtrait = headProtrait;
        }

        public String getSignature() {
            return signature;
        }

        public void setSignature(String signature) {
            this.signature = signature;
        }

        public String getUserId() {
            return userId;
        }

        public void setUserId(String userId) {
            this.userId = userId;
        }

        public String getUsername() {
            return username;
        }

        public void setUsername(String username) {
            this.username = username;
        }

        public String getProfessional() {
            return professional;
        }

        public void setProfessional(String professional) {
            this.professional = professional;
        }

        public ArrayList<String> getSpecialty() {
            return specialty;
        }

        public void setSpecialty(ArrayList<String> specialty) {
            this.specialty = specialty;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel parcel, int i) {
            parcel.writeString(address);
            parcel.writeByte((byte) (followeeStatus ? 1 : 0));
            parcel.writeInt(followees);
            parcel.writeInt(follower);
            parcel.writeString(headProtrait);
            parcel.writeString(signature);
            parcel.writeString(userId);
            parcel.writeString(username);
            parcel.writeString(professional);
            parcel.writeStringList(specialty);
        }
    }
}
